<template>
  <!-- #ifdef H5 -->
  <el-checkbox-group v-model="bindValue" :min="min" :max="max">
    <el-checkbox
      v-for="item in options"
      :key="item.value"
      :label="item.value"
      :disabled="item.disabled"
    >
      {{ item.label }}
    </el-checkbox>
  </el-checkbox-group>
  <!-- #endif -->
</template>
<script setup>
import {
  getCurrentInstance,
  computed,
  toRefs,
  reactive,
  ref,
  watch,
  onMounted,
  markRaw,
  useSlots,
} from "vue";
// #ifdef H5
import { ElCheckbox, ElCheckboxGroup } from "element-plus";
import "element-plus/theme-chalk/el-checkbox.css";
// #endif
const props = defineProps({
  modelValue: {
    type: Array,
  },
  options: {
    type: Array,
  },
  min: {
    type: Number,
  },
  max: {
    type: Number,
  },
});

const emits = defineEmits(["update:modelValue"]);

const bindValue = computed({
  get() {
    return props.modelValue;
  },
  set(value) {
    emits("update:modelValue", value);
  },
});
</script>
